set SrcDir="d:\test\"
set DaysAgo=60
forfiles /p %SrcDir% /d -%DaysAgo% /c "cmd /c if @isdir==TRUE echo @file" >> %SrcDir%kill.txt
@echo off& for /f "delims=" %%1 in (%SrcDir%kill.txt)do (set x=%%1&& call set x=%%x:"=%%
>>%SrcDir%kill2.txt call echo %%x%%)
For /f "tokens=*" %%i in (%SrcDir%kill2.txt) DO rd/s/q %SrcDir%%%i
del %SrcDir%kill.txt
del %SrcDir%kill2.txt
